home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl67.lha / tcl6.7 / doc / StrMatch.3 < prev    next >
Text File  |  1993-01-31  |  1KB  |  42 lines

  1. '\"
  2. '\" Copyright 1989 Regents of the University of California
  3. '\" Permission to use, copy, modify, and distribute this
  4. '\" documentation for any purpose and without fee is hereby
  5. '\" granted, provided that this notice appears in all copies.
  6. '\" The University of California makes no representations about
  7. '\" the suitability of this material for any purpose.  It is
  8. '\" provided "as is" without express or implied warranty.
  9. '\" 
  10. '\" $Header: /user6/ouster/tcl/man/RCS/StrMatch.3,v 1.5 93/01/31 15:35:41 ouster Exp $ SPRITE (Berkeley)
  11. '\" 
  12. .so man.macros
  13. .HS Tcl_StringMatch tcl
  14. .BS
  15. .SH NAME
  16. Tcl_StringMatch \- test whether a string matches a pattern
  17. .SH SYNOPSIS
  18. .nf
  19. \fB#include <tcl.h>\fR
  20. .sp
  21. int
  22. \fBTcl_StringMatch\fR(\fIstring\fR, \fIpattern\fR)
  23. .SH ARGUMENTS
  24. .AP char *string in
  25. String to test.
  26. .AP char *pattern in
  27. Pattern to match against string.  May contain special
  28. characters from the set *?\e[].
  29. .BE
  30.  
  31. .SH DESCRIPTION
  32. .PP
  33. This utility procedure determines whether a string matches
  34. a given pattern.  If it does, then \fBTcl_StringMatch\fR returns
  35. 1.  Otherwise \fBTcl_StringMatch\fR returns 0.  The algorithm
  36. used for matching is the same algorithm used in the ``string match''
  37. Tcl command and is similar to the algorithm used by the C-shell
  38. for file name matching;  see the Tcl manual entry for details.
  39.  
  40. .SH KEYWORDS
  41. match, pattern, string
  42.